/*     */ package com.lmpop.trade.ti_workexper;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ 
/*     */ public class Ti_workexperInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */ 
/*     */   public Ti_workexperInfo()
/*     */   {
/*  15 */     this.queryList = new QueryList();
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  24 */     Ti_workexper ti_workexper = new Ti_workexper();
/*  25 */     ti_workexper.setWork_id(map.getString("work_id"));
/*  26 */     ti_workexper.setResume_id(map.getString("resume_id"));
/*  27 */     ti_workexper.setCompany(map.getString("company"));
/*  28 */     ti_workexper.setCust_type(map.getString("cust_type"));
/*  29 */     ti_workexper.setCust_size(map.getString("cust_size"));
/*  30 */     ti_workexper.setBisiness(map.getString("bisiness"));
/*  31 */     ti_workexper.setDepart(map.getString("depart"));
/*  32 */     ti_workexper.setCareer_type(map.getString("career_type"));
/*  33 */     ti_workexper.setCareer(map.getString("career"));
/*  34 */     ti_workexper.setWork_date(map.getString("work_date"));
/*  35 */     ti_workexper.setSalary(map.getString("salary"));
/*  36 */     ti_workexper.setWork_desc(map.getString("work_desc"));
/*     */ 
/*  38 */     String result_code = "0";
/*     */     try {
/*  40 */       insert(dbmMgr, ti_workexper);
/*     */     } catch (ApplicationException e) {
/*  42 */       e.printStackTrace();
/*  43 */       result_code = "1";
/*     */     }
/*  45 */     map.setString("result_code", result_code);
/*  46 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_workexper ti_workexper)
/*     */     throws ApplicationException
/*     */   {
/*  55 */     dbmMgr.update("insertTi_workexper", ti_workexper);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  65 */     String pkid_string = map.getString("pkid");
/*  66 */     String result_code = "0";
/*     */     try {
/*  68 */       if (!pkid_string.equals("")) {
/*  69 */         String[] pkStr = pkid_string.split("\\|");
/*  70 */         for (int i = 0; i < pkStr.length; i++) {
/*  71 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/*  75 */       e.printStackTrace();
/*  76 */       result_code = "1";
/*     */     }
/*  78 */     map.setString("result_code", result_code);
/*  79 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/*  88 */     dbmMgr.update("deleteTi_workexper", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap deleteByResumeid(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  98 */     String pkid_string = map.getString("pkid");
/*  99 */     String result_code = "0";
/*     */     try {
/* 101 */       if (!pkid_string.equals("")) {
/* 102 */         String[] pkStr = pkid_string.split("\\|");
/* 103 */         for (int i = 0; i < pkStr.length; i++) {
/* 104 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/* 108 */       e.printStackTrace();
/* 109 */       result_code = "1";
/*     */     }
/* 111 */     map.setString("result_code", result_code);
/* 112 */     return map;
/*     */   }
/*     */ 
/*     */   public void deleteByResumeid(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/* 121 */     dbmMgr.update("deleteTi_workexperByResumeid", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 130 */     Ti_workexper ti_workexper = new Ti_workexper();
/* 131 */     ti_workexper.setWork_id(map.getString("work_id"));
/* 132 */     ti_workexper.setResume_id(map.getString("resume_id"));
/* 133 */     ti_workexper.setCompany(map.getString("company"));
/* 134 */     ti_workexper.setCust_type(map.getString("cust_type"));
/* 135 */     ti_workexper.setCust_size(map.getString("cust_size"));
/* 136 */     ti_workexper.setBisiness(map.getString("bisiness"));
/* 137 */     ti_workexper.setDepart(map.getString("depart"));
/* 138 */     ti_workexper.setCareer_type(map.getString("career_type"));
/* 139 */     ti_workexper.setCareer(map.getString("career"));
/* 140 */     ti_workexper.setWork_date(map.getString("work_date"));
/* 141 */     ti_workexper.setSalary(map.getString("salary"));
/* 142 */     ti_workexper.setWork_desc(map.getString("work_desc"));
/*     */ 
/* 144 */     String result_code = "0";
/*     */     try {
/* 146 */       update(dbmMgr, ti_workexper);
/*     */     } catch (ApplicationException e) {
/* 148 */       e.printStackTrace();
/* 149 */       result_code = "1";
/*     */     }
/* 151 */     map.setString("result_code", result_code);
/* 152 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_workexper ti_workexper)
/*     */     throws ApplicationException
/*     */   {
/* 161 */     dbmMgr.update("updateTi_workexper", ti_workexper);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 171 */     Ti_workexper ti_workexper = (Ti_workexper)obj;
/* 172 */     if (start == 0)
/* 173 */       start = 0;
/*     */     else {
/* 175 */       start = (start - 1) * limit;
/*     */     }
/* 177 */     ti_workexper.setStart(Integer.valueOf(start));
/* 178 */     ti_workexper.setLimit(Integer.valueOf(limit));
/* 179 */     return this.queryList.getList("getListByTi_workexperPage", ti_workexper);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 190 */     Ti_workexper ti_workexper = (Ti_workexper)obj;
/* 191 */     List list = this.queryList.getList("getCountByObjTi_workexper", obj);
/* 192 */     int count = 0;
/* 193 */     if ((list != null) && (list.size() > 0)) {
/* 194 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 195 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 196 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 199 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 209 */     return this.queryList.getList("getTi_workexperByPk", pk);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_workexper.Ti_workexperInfo
 * JD-Core Version:    0.6.0
 */